package com.itheima;

import java.sql.SQLOutput;
import java.util.Scanner;

public class Test6 {
    public static void main(String[] args) {
        //键盘录入字符用Scanner实现
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入:");
        String s = sc.nextLine();
        System.out.println(s);
        //将键盘录入内容中的TMD敏感词汇替换成***
        String[] mgc = {"TMD","tmd","sb","cnm"};
        for (int i = 0; i < mgc.length; i++) {
        s = s.replace(mgc[i],"***");
        }
        //        //输出结果
        System.out.println(s);
    }
}
